<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title> hAdmin- 主页</title>

    <meta name="keywords" content="">
    <meta name="description" content="">

    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

    <link rel="shortcut icon" href="favicon.ico"> <link href="/Public/Admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/Public/Admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/Admin/css/animate.css" rel="stylesheet">
    <link href="/Public/Admin/css/style.css?v=4.1.0" rel="stylesheet">
        <!-- 百度编辑器 -->
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.all.min.js"> </script>
</head>

<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
    <div id="wrapper">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close"><i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header">
                        <div class="dropdown profile-element">
                            <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                                    <span class="block m-t-xs" style="font-size:20px;">
                                        <i class="fa fa-area-chart"></i>
                                        <strong class="font-bold">后台管理</strong>
                                    </span>
                                </span>
                            </a>
                        </div>
                        <div class="logo-element"><i class="fa fa-area-chart"></i>
                        </div>
                    </li>
                    <!-- 
	                    <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
	                        <span class="ng-scope">Menu</span>
	                    </li> 
                    -->
                    
                    <li>
                        <a class="J_menuItem" href="<?php echo U('Index/index');?>">
                            <i class="fa fa-home"></i>
                            <span class="nav-label">主页</span>
                        </a>
                    </li>
                    <?php if(is_array($menu)): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
	                        <a href="#">
	                            <i class="fa fa fa-bar-chart-o"></i>
	                            <span class="nav-label"><?php echo ($vo["title"]); ?></span>
	                            <span class="fa arrow"></span>
	                        </a>
	                        <ul class="nav nav-second-level">
	                            <?php if(is_array($vo['_data'])): $i = 0; $__LIST__ = $vo['_data'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vvo): $mod = ($i % 2 );++$i;?><li>
		                                <a class="J_menuItem" href="<?php echo U($vvo['url']);?>"><?php echo ($vvo['title']); ?></a>
		                            </li><?php endforeach; endif; else: echo "" ;endif; ?>
	                        </ul>
	                    </li><?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                       <a class="navbar-minimalize minimalize-styl-2 btn btn-info " href="#"><i class="fa fa-bars"></i> </a>
                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li class="dropdown">
                            <a class="dropdown-toggle count-info" onclick="outLogin()">
                               <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
                               <!-- <i class="fa fa-envelope"></i> <span class="label label-warning">16</span>-->
                                <!--layer弹框-->
							    <script src="/Public/layer/layer.js"></script>
							    <script>
							    
							     function outLogin(){
							           $.ajax({
							            url     :"<?php echo U('Login/outLogin');?>",
							            dataType:'json',
							            success :function(res){
							                if(res.status == 1){
							                	layer.msg(res.info,{time:2000},function(){ 
							                       location.href  = "<?php echo U('Login/index');?>";
							                    });
							                }
							            }
							           })
							     }
							       
							    </script>
                            </a>
                        </li>
                        <!--
                        <li class="dropdown">
                            <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
                                <i class="fa fa-bell"></i> <span class="label label-primary">8</span>
                            </a>
                        </li>
                        -->
                    </ul>
                </nav>
            </div>
            <div class="row J_mainContent" id="content-main" style="overflow-Y:scroll;">
              
  <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改商品</h5>
                    </div>
                    <div class="ibox-content">
                        <form method="post" class="form-horizontal" action="<?php echo U('Goods/update');?>" enctype ="multipart/form-data">
                            <input type="hidden" name="goods_id" value="<?php echo ($row["goods_id"]); ?>">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" style="text-align: center;color:red">**必填**</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">商品标题</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="title" value="<?php echo ($row["title"]); ?>">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-10">
                                    <img src="<?php echo ($row["pic"]); ?>" alt="" width="150px" height="80px">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">首图</label>
                                <div class="col-sm-10">
                                    <input type="file" name="file">
                                    <input type="hidden" name="pic" value="<?php echo ($row["pic"]); ?>">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">商品类别</label>

                                <div class="col-sm-10">
                                    <select name="class" class="col-sm-10" >
                                        <?php if(is_array($type)): $i = 0; $__LIST__ = $type;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["class"]); ?>" <?php if(($vo["class"]) == $row["class"]): ?>selected<?php endif; ?> ><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">排序</label>

                                <div class="col-sm-10">
                                    <input type="type" class="form-control" name="sort" value="<?php echo ($row["sort"]); ?>">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">中文摘要</label>

                                <div class="col-sm-10">
                                   <textarea name="c_summary" id="" cols="140" rows="8"><?php echo ($row["c_summary"]); ?></textarea>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">中文内容</label>

                                <label class="col-sm-2 control-label"><?php echo ($vo["web_text"]); ?></label>
                                         <script>
                                            var ue1 = UE.getEditor('c_content');
                                        </script>
                                <div class="col-sm-10">
                                    <textarea id="c_content" name="c_content" name="" id="" cols="30" rows="10"><?php echo ($row["c_content"]); ?></textarea>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否显示</label>

                                <div class="col-sm-10">
                                    <div class="radio">
                                        <label>
                                            <input type="radio" value="1" <?php if($row["status"] == '1'): ?>checked<?php endif; ?>  name="status">是</label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" value="2" <?php if($row["status"] == '2'): ?>checked<?php endif; ?> name="status">否</label>
                                    </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" style="text-align: center;color:red">**可选**</label>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">作者</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="auther" value="<?php echo ($row["auther"]); ?>">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">关键字</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="keyword" value="<?php echo ($row["key"]); ?>">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否置顶</label>

                                <div class="col-sm-10">
                                    <div class="radio">
                                        <label>
                                            <input type="radio" value="2" id="optionsRadios1"  name="top" <?php if($row["top"] == '1'): ?>checked<?php endif; ?> >否</label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" value="1" id="optionsRadios2" name="top" <?php if($row["top"] == '2'): ?>checked<?php endif; ?> >是</label>
                                    </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">英文摘要</label>

                                <div class="col-sm-10">
                                   <textarea name="e_summary" id="" cols="140" rows="8"><?php echo ($row["e_summary"]); ?></textarea>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">英文内容</label>

                                <label class="col-sm-2 control-label"><?php echo ($vo["web_text"]); ?></label>
                                         <script>
                                            var ue1 = UE.getEditor('e_content');
                                        </script>
                                <div class="col-sm-10">
                                    <script id="e_content" type="text/plain" style="width:1024px;height:250px;" name="e_content"><?php echo ($row["e_content"]); ?></script>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                    <button class="btn btn-white" type="submit">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>

            </div>
        </div>
        <!--右侧部分结束-->
    </div>

    <!-- 全局js -->
    <script src="/Public/Admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/Public/Admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/Public/Admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="/Public/Admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="/Public/Admin/js/plugins/layer/layer.min.js"></script>

    <!-- 自定义js -->
    <script src="/Public/Admin/js/hAdmin.js?v=4.1.0"></script>
    <script type="text/javascript" src="/Public/Admin/js/index.js"></script>

    <!-- 第三方插件 -->
    <script src="/Public/Admin/js/plugins/pace/pace.min.js"></script>

</body>

</html>